package com.dna.controller;

import com.dna.entity.ItemSortEntity;
import com.dna.entity.UserEntity;
import com.dna.service.ItemSortService;
import com.dna.utils.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.crypto.hash.Sha256Hash;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Created by yzc on 2018/4/9.
 */

@RestController
@RequestMapping("/item")
@Api("事项需求")
public class ItemSortController {

    @Autowired
    private ItemSortService itemSortService;

    /**
     * 新增需求
     * @param ise
     * @return
     */
    @PostMapping("save")
    @ApiOperation(value = "新增需求")
    public R saveUser(ItemSortEntity ise) {
        if(ise.getHasChild()==null){
            ise.setHasChild(0);
        }
        return R.ok();
    }
}
